<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableMobileVerificationCodes extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mobile_verification_codes', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->unsigned()->nullable();
            $table->char('area_code', 6);
            $table->string('mobile');
            $table->char('code', 6);
            $table->boolean('checked')->default(false);
            $table->string('result_request_id')->nullable();
            $table->string('result_code')->nullable();
            $table->string('result_message')->nullable();
            $table->string('result_biz_id')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mobile_verification_codes');
    }
}
